// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const { ccclass, property } = cc._decorator;

@ccclass
export default class privacy extends cc.Component {
    /**同意后回调，用于更新数据*/
    cb: Function = null
    /**初始化*/
    init(cb) {
        this.cb = cb
        this.node.active = true
    }
    /**用户接受 */
    accept() {
        this.cb()
        this.node.active = false
    }
    /**用用户取消 */
    deny() {
        cc.game.end()
    }
}
